#!/bin/sh

for X in $(cat /proc/cmdline); do
    case ${X} in
        rootpw=*)
            PW=${X#rootpw=}
            usermod -p $(echo ${PW} | mkpasswd -s) root
            exit 0
            ;;
    esac
done
